
#pragma once

template<class T, class F>
struct TFieldSorter {
public:
    TFieldSorter(F T::*field)
    : Field(field)
    {}

    bool operator()  (const T& r, const T& l) const
    {
        return r.*Field < l.*Field;
    }
private:
    F   T::*Field;

};
